Skip to content

Comments

Bugfixes for OS_IPFound, OS_IPFoundList, OS_IsValidIP.#920

Merged
ddpbsd merged 1 commit intoossec:masterfrom
reyjrar:bugfix/broken_ip_comparison
Aug 11, 2016
Merged

Bugfixes for OS_IPFound, OS_IPFoundList, OS_IsValidIP.#920
ddpbsd merged 1 commit intoossec:masterfrom
reyjrar:bugfix/broken_ip_comparison

Conversation

@reyjrar
Copy link
Member

@reyjrar reyjrar commented Aug 11, 2016

OS_IsValidIP violated it's const constraint when the ip_addr element
was set to 'any'. This caused some unexplained behavior when subsequent
calls. This is corrected.

OS_IPFound and OS_IPFoundList where call sacmp(), but if OS_IsValidIP
was called with "any", the sockaddr_store.ss_family would be AF_INET6.
AFAICT, this meant any comparison of "any" to an IPv4 address would
fail. This affected the ossec-remoted when validating IPv4 keys issued
by authd which set 'any' as the IP address to verify.

This would also cause failures everywhere in the rules, analysis,
exec, and activeresponse code where the src/dst IP being compared to any
was IPv4.

OS_IsValidIP violated it's `const` constraint when the ip_addr element
was set to 'any'.  This caused some unexplained behavior when subsequent
calls.  This is corrected.

OS_IPFound and OS_IPFoundList where call sacmp(), but if OS_IsValidIP
was called with "any", the sockaddr_store.ss_family would be AF_INET6.
AFAICT, this meant any comparison of "any" to an IPv4 address would
fail.  This affected the ossec-remoted when validating IPv4 keys issued
by authd which set 'any' as the IP address to verify.

This would also cause failures *everywhere* in the rules, analysis,
exec, and activeresponse code where the src/dst IP being compared to any
was IPv4.
@reyjrar
Copy link
Member Author

reyjrar commented Aug 11, 2016

Testing this on my infrastructure to ensure it's the last bug in 2.9 that's breaking the OSSEC/authd stuff.

@ddpbsd ddpbsd merged commit f42e4d0 into ossec:master Aug 11, 2016
atomicturtle added a commit to atomicturtle/ossec-hids that referenced this pull request Aug 31, 2016
Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants